#ifndef CONFIGPARSER_H
#define CONFIGPARSER_H

#include <iostream>
#include <cstdlib>
#include "libconfig.h++"
#include <map>
#include <vector>
#include <string>
#include "TH1F.h"
#include "TH2F.h"
#include "base/Analysis.h"
class ConfigParser{
	
public:
ConfigParser();
~ConfigParser();

std::vector<std::string> getTH1FKeys();
std::map<std::string,TH1F*> getTH1FMap();
std::vector<std::string> getTH2FKeys();
std::map<std::string,TH2F*> getTH2FMap();
//std::vector<std::string> getKinKeys();
//std::map<std::string,double> getKinMap();

void ParseTHs(std::string/*config filename*/,std::string/*object type TH1F or TH2F*/);
void ParseAnalysisSettings(std::string);
void PaerseRunSettings(std::string);
std::vector<std::string> getCfgFileList();
std::map<std::string,Analysis*> getAnaMap();

//Analysis Specific settings
std::string DataType;
std::string name;
int Nevents;
std::string RunName;
bool doGRL;
std::string TreeName;

//void ParseKin();
//void ParseAll();

private:
std::vector<std::string> TH1FKeys;
std::map<std::string,TH1F*> TH1FMap;
std::vector<std::string> TH2FKeys;
std::map<std::string,TH2F*> TH2FMap;
std::map<std::string,Analysis*> AnaMap;
std::vector<std::string> CfgFileList;

//std::vector<std::string> KinKeys;
//std::map<std::string,double> KinMap;
};

#endif
//Note of the day : 
//that should be working didnt test it yet
